using Furion.DatabaseAccessor;

using Microsoft.EntityFrameworkCore;

using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Abc.Core.Entities
{
    /// <summary>
    /// 审计日志
    /// </summary>
    [Comment("审计日志")]
    [Table("AutidLog")]
    public class AutidLog : EntityBase
    {
        /// <summary>
        /// 表名
        /// </summary>
        [Comment("表名")]
        public string Table { get; set; }

        /// <summary>
        /// ID，主键ID
        /// </summary>
        [Comment("ID，主键ID")]
        public string DataId { get; set; }

        ///// <summary>
        ///// 更新的列
        ///// </summary>
        //public string Column { get; set; }

        ///// <summary>
        ///// 新值
        ///// </summary>
        //public string NewValue { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        [Comment("内容")]
        public string Content { get; set; }

        ///// <summary>
        ///// 旧值
        ///// </summary>
        //public string OldValue { get; set; }
        /// <summary>
        /// 操作时间
        /// </summary>
        [Comment("操作时间")]
        public DateTimeOffset CreatedTime { get; set; }

        /// <summary>
        /// 操作人ID
        /// </summary>
        [Comment("操作人ID")]
        public int UserId { get; set; }

        /// <summary>
        /// 操作人账户名
        /// </summary>
        [Comment("操作人账户名")]
        public string UserName { get; set; }

        /// <summary>
        /// 操作方式：新增、更新、删除
        /// </summary>
        [Comment("操作方式：新增、更新、删除")]
        public string Operate { get; set; }
    }
}